import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/notice_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class NoticeDetailEntity {
	late int code;
	late String msg;
	late List<NoticeDetailData> data;

	NoticeDetailEntity();

	factory NoticeDetailEntity.fromJson(Map<String, dynamic> json) => $NoticeDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $NoticeDetailEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class NoticeDetailData {
	late int id;
	late String title;
	late String content;
	@JSONField(name: "sort_id")
	late int sortId;
	late String platform;

	NoticeDetailData();

	factory NoticeDetailData.fromJson(Map<String, dynamic> json) => $NoticeDetailDataFromJson(json);

	Map<String, dynamic> toJson() => $NoticeDetailDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}